-- GENERATED SPELL FOR [Sister of Pain] --


function spell0_22956(pUnit, Event) --@Lash of Pain,n/a--
pUnit:FullCastSpellOnTarget(41353,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22956', 564, 1)
end

function spell1_22956(pUnit, Event) --@Painful Rage,Self--
pUnit:FullCastSpellOnTarget(41369,pUnit)
pUnit:RegisterEvent('Sorts_22956', 579, 1)
end

function spell2_22956(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(41355,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22956', 18000, 1)
end

function spell3_22956(pUnit, Event) --@Shared Bonds,n/a--
pUnit:FullCastSpellOnTarget(41362,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22956', 533, 1)
end

function spell4_22956(pUnit, Event) --@Shell of Pain,Self--
pUnit:FullCastSpellOnTarget(41371,pUnit)
pUnit:RegisterEvent('Sorts_22956', 16000, 1)
end

function Sorts_22956(pUnit, Event)
local choix_sorts_22956 = math.random(0, 4)
if choix_sorts_22956 == 0 then
pUnit:RegisterEvent('spell0_22956', 1, 1)
end
if choix_sorts_22956 == 1 then
pUnit:RegisterEvent('spell1_22956', 1, 1)
end
if choix_sorts_22956 == 2 then
pUnit:RegisterEvent('spell2_22956', 1, 1)
end
if choix_sorts_22956 == 3 then
pUnit:RegisterEvent('spell3_22956', 1, 1)
end
if choix_sorts_22956 == 4 then
pUnit:RegisterEvent('spell4_22956', 1, 1)
end
end

function mob22956_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22956', math.random(1500, 3000), 1)
end

function mob22956_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22956_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22956_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22956, 1, 'mob22956_Action')
RegisterUnitEvent(22956, 2, 'mob22956_Leave')
RegisterUnitEvent(22956, 3, 'mob22956_Kill')
RegisterUnitEvent(22956, 4, 'mob22956_Die')
